package com;

import java.util.ArrayList;

public interface RPCApi {

	public ArrayList<PeerData> query(int queryId, String name);
	public String cmd(String cmd); 
	public void ping();
	
	/**
	 * Greet a new neighbour for negotiating neighbourship
	 * @param  rPD is the PeerData of the peer requesting neighbourship
	 * @return True if neighbour accepts, false if rejected.
	 */
	public boolean greet(PeerData rPD);
	
	/**
	 * Ask if a peer knows a certain resource
	 */
	public String find(String key, String name, int ttl);
	public String walk(String key, String name, int ttl);
}
